<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp" %>
<!doctype html>
<html lang="zh-cn">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title><sitemesh:write property="title"/></title>
<link type="text/css" rel="stylesheet" href="${ctx }/js/jqueryValidator/validationEngine.jquery.css"/>

<!-- bootstrap & fontawesome -->
<link rel="stylesheet" href="${ctx }/css/bootstrap/bootstrap.css" />
<link rel="stylesheet" href="${ctx }/css/bootstrap/font-awesome.css" />

<!-- andun -->
<link rel="stylesheet" href="${ctx }/css/bootstrap/project.css" />

<!-- page specific plugin styles -->
<link rel="stylesheet" href="${ctx }/css/bootstrap/jquery-ui.custom.css" />
<link rel="stylesheet" href="${ctx }/css/bootstrap/chosen.css" />
<link rel="stylesheet" href="${ctx }/css/bootstrap/datepicker.css" />
<link rel="stylesheet" href="${ctx }/css/bootstrap/bootstrap-timepicker.css" />
<link rel="stylesheet" href="${ctx }/css/bootstrap/daterangepicker.css" />
<link rel="stylesheet" href="${ctx }/css/bootstrap/bootstrap-datetimepicker.css" />

<!-- text fonts -->
<link rel="stylesheet" href="${ctx }/css/bootstrap/ace-fonts.css" />

<!-- ace styles -->
<link rel="stylesheet" href="${ctx }/css/bootstrap/ace.css" class="ace-main-stylesheet" id="main-ace-style" />

<!--[if lte IE 9]>
    <link rel="stylesheet" href="${ctx }/css/bootstrap/ace-part2.css" class="ace-main-stylesheet" />
<![endif]-->

<!--[if lte IE 9]>
  <link rel="stylesheet" href="${ctx }/css/bootstrap/ace-ie.css" />
<![endif]-->

<!-- inline styles related to this page -->

<!-- ace settings handler -->
<script src="${ctx }/js/bootstrap/ace-extra.js"></script>

<!-- HTML5shiv and Respond.js for IE8 to support HTML5 elements and media queries -->

<!--[if lte IE 8]>
<script src="${ctx }/js/bootstrap/html5shiv.js"></script>
<script src="${ctx }/js/bootstrap/respond.js"></script>
<![endif]-->
<sitemesh:write property="head"/>
</head>
<body class="no-skin">
	<div class="navbar navbar-default" id="navbar"><!-- 头部 -->
		<%@ include file="/common/header.jsp" %>
	</div>
	<div class="main-container" id="main-container"><!-- 头部以下-->
		<script type="text/javascript">
            try{ace.settings.check('main-container' , 'fixed')}catch(e){}
        </script>
        <div class="main-container-inner">
        	<a class="menu-toggler" id="menu-toggler" href="#">
                <span class="menu-text"></span>
            </a>
            <div class="sidebar" id="sidebar"><!-- 左侧菜单 -->
            	<%@ include file="/common/left.jsp"%>
            </div><!-- #sidebar -->
            <div class="main-content">
            	<sitemesh:write property="body"/>
            </div>
        </div>
	</div>
<!-- basic scripts -->

    <!--[if !IE]> -->

    <script type="text/javascript">
		window.jQuery || document.write("<script src='${ctx}/js/bootstrap/jquery.js'>"+"<"+"/script>");
	</script>

    <!-- <![endif]-->

    <!--[if IE]>
    <script type="text/javascript">
    window.jQuery || document.write("<script src='${ctx}/js/bootstrap/jquery1x.js'>"+"<"+"/script>");
    </script>
    <![endif]-->

    <script type="text/javascript">
        if("ontouchend" in document) document.write("<script src='${ctx}/js/bootstrap/jquery.mobile.custom.js'>"+"<"+"/script>");
    </script>
    <script src="${ctx}/js/bootstrap/bootstrap.js"></script>

    <!-- page specific plugin scripts -->

    <!--[if lte IE 8]>
      <script src="${ctx}/js/bootstrap/excanvas.js"></script>
    <![endif]-->

    <!-- ace scripts -->

    <script src="${ctx}/js/bootstrap/ace-elements.js"></script>
    <script src="${ctx}/js/bootstrap/ace.js"></script>
    
    <script src="${ctx}/js/bootstrap/date-time/bootstrap-datepicker.js"></script>
	<script src="${ctx}/js/bootstrap/date-time/bootstrap-timepicker.js"></script>
    <script src="${ctx}/js/bootstrap/date-time/moment.js"></script>
    <script src="${ctx}/js/bootstrap/date-time/daterangepicker.js"></script>
    <script src="${ctx}/js/bootstrap/date-time/bootstrap-datetimepicker.js"></script>

    
 <%--    <script type="text/javascript" src="${ctx }/js/artDialog/artDialog.js"></script>
    <script type="text/javascript" src="${ctx }/js/artDialog/iframeTools.js"></script>  --%>
    <script src="${ctx}/js/common/artDialog.js?skin=blue" type="text/javascript"></script>
	<script src="${ctx}/js/common/iframeTools.js" type="text/javascript"></script>
	<script type="text/javascript" src="${ctx }/js/jqueryValidator/jquery.validationEngine-zh_CN.js"></script>
	<script type="text/javascript" src="${ctx }/js/jqueryValidator/jquery.validationEngine.js"></script>
	<script type="text/javascript" src="${ctx }/js/common/jquery.form.js"></script>
	
	<script type="text/javascript" src="${ctx }/js/ztree/jquery.ztree.core-3.5.js"></script>
	<script type="text/javascript" src="${ctx }/js/ztree/jquery.ztree.excheck-3.5.js"></script>
	
	<script type="text/javascript" src="${ctx }/js/common/page.js"></script>
	<script type="text/javascript" src="${ctx }/js/common/common.js"></script>
	<script type="text/javascript" src="${ctx }/js/uploadFile/swfobject.js"></script>
	<script type="text/javascript" src="${ctx }/js/uploadFile/jquery.uploadify.min.js"></script>
	<script type="text/javascript" src="${ctx }/js/common/jqthumb.js"></script>
	
	<script type="text/javascript" src="${ctx }/js/guanjianzi/tabControl.js"></script>
    
    <script type="text/javascript">
    $(function() {
		$("#mainForm").validationEngine('attach', {promptPosition : "bottomRight:-60,-20", scroll:false,
			autoHidePrompt: true,autoHideDelay: 5000 }); 
		
	});
    (function (config) { 
        config['lock'] = true; 
        config['fixed'] = true; 
        config['yesText'] = '是'; 
	    config['noText'] = '否';  
        // [more..] 
        })(art.dialog.defaults);
    function checkAll(){
     	$('input[name="checkboxs"]').prop("checked",$('#ids').is(":checked")); 
    }
		$(".shortcut01").click(function(){
			$(".nav-list").hide();
			$(".navlist01").show();
		});
		$(".shortcut02").click(function(){
			$(".nav-list").hide();
			$(".navlist02").show();
		});
		$(".shortcut03").click(function(){
			$(".nav-list").hide();
			$(".navlist03").show();
		});
		$(".shortcut04").click(function(){
			$(".nav-list").hide();
			$(".navlist04").show();
		});
		
		$(".project-searchbutton").click(function(){
			if($(".project-searchbox").css("display") == "none"){
			    $(".project-searchbox").slideDown();
				$(".project-searchbutton").html("<i class='icon-chevron-up'></i> 收起查询");
			} else {
				$(".project-searchbox").slideUp();
				$(".project-searchbutton").html("<i class='icon-search'></i> 展开查询");
			};
			
		});
		
		/* $.post('${ctx}/information/count','',function(data){
			$('#infoCount').html(data);
		});
		$.post('${ctx}/information/ajaxList','',function(data){
			var html = '';
			for(var i=0;i<data.result.length;i++){
				html+='<li title="'+data.result[i].content+'"><a ><i class="btn btn-xs btn-primary icon-info"></i>';
				if(data.result[i].content.length>25)
					html+=data.result[i].content.substr(data.result[i].content,25)+'...';
				else
					html+=data.result[i].content;
            	html+='</a></li>';
			}
			$('#info-ul').prepend(html);
		}); */
		
	</script>
    <script type="text/javascript">
	jQuery(function($) {
		$('.date-picker').datepicker({autoclose:true}).next().on(ace.click_event, function(){
			$(this).prev().focus();
		});
		$('input[name=date-range-picker]').daterangepicker({format:"YYYY-MM-DD",locale : {  
            applyLabel : '确定',  
            cancelLabel : '取消',  
            fromLabel : '起始时间',  
            toLabel : '结束时间',  
            customRangeLabel : '自定义',  
            daysOfWeek : [ '日', '一', '二', '三', '四', '五', '六' ],  
            monthNames : [ '一月', '二月', '三月', '四月', '五月', '六月',  
                    '七月', '八月', '九月', '十月', '十一月', '十二月' ],  
            firstDay : 1  
        } }).prev().on(ace.click_event, function(){
			$(this).next().focus();
		});
		
		$('#timepicker1').timepicker({
			minuteStep: 1,
			showSeconds: true,
			showMeridian: false
		}).next().on(ace.click_event, function(){
			$(this).prev().focus();
		});
	});

	</script>
	
	<script type="text/javascript">
		$(document).ready(function(){
			/*$('.submenu').each(function(i){
        		if($.trim($(this).html())==''){
        			$(this).parent('li').remove();
        		}
        	});
			 $('.nav').each(function(i){
				if($.trim($(this).html())==''){
        			$('.shortcut'+$(this).attr('id').substring(7)).remove();
        		}
			}); */
			var url = '${menuUrl}'
			var index = '${param.index}'
			if(index=='1'){
				$("#navlist02").show();
				return;
			}
			if(url != ""){
				var flag = false;
				$("ul[id^=navlist]").each(function(){
					var aObj = $(this).find("a[href='"+url+"?menuUrlSign=1']");
					
					if($(aObj).attr("href") != undefined){
						$(this).show();
						var ul = $(aObj).parent().parent();
						var ulClassP = $(ul).attr("class");
						
						$(aObj).parent().addClass("active");//给选中的连接的li加样式
						
						if(!(ulClassP.indexOf("nav-list navlist") > 0)){//说明有二级或者三级的情况
							$(ul).parent().addClass("open");//li展开
							$(ul).show();//无论是二级或者三级都需要把直接父层show
							
							var ulPPP = $(aObj).parent().parent().parent().parent().parent().parent();
							var ulClassPPP = $(ulPPP).attr("class");
							
							if(ulClassPPP.indexOf("nav-list navlist") > 0){//三级
								$(ul).parent().parent().show();
								$(ul).parent().parent().parent().addClass("open");
							}
						}
						
						/* if(ulClass == "submenu"){//最子层的
							$(ul).show();
							$(aObj).parent().addClass("active");
							$(ul).parent().addClass("open");
							
						}else{
							$(ul).show();
							$(aObj).parent().addClass("active");
						} */
						flag = true;
					}else{
						
					}
				});
				if(!flag){
					$("#navlist01").show();	
				}
			}else if(url =="/project/home/home"){
				$("#navlist02").show();//默认业务层show
			}
			

		});
	</script>
</body>
</html>